package com.my.demoo1.controller;

import com.my.demoo1.entity.Student;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
public class HomeController {
    //日志记录
//    Logger logger= LoggerFactory.getLogger(HomeController.class);
    @Autowired
    Student stu;
    @RequestMapping("/index")
    public String index(Model model){
         model.addAttribute("stu",stu);
//         logger.error("error--------index页面");
//         logger.warn("warn--------index页面");
//         logger.debug("debug--------index页面");
//         logger.error("info--------index页面");
         return "index";
    }
}
